1. Field of the Invention
The present invention relates generally to 3D graphics and sampling/antialiasing techniques and more particularly to a system and method for efficiently sampling 3D primitives while minimizing the aliasing artifacts that are caused by sampling.
2. Description of Related Art
The problem of aliasing typically occurs when a continuous signal is represented in a discrete form (commonly referred to as sampling). In the context of 3D graphics, a continuous object (such as a polygon) is represented by a collection of discrete points (pixels) on a display screen. If the sampling is not carefully performed, aliasing artifacts may significantly corrupt the rendered scene. Aliasing artifacts include “jaggies” or “staircasing” that normally appear on the edges of the primitives. The staircase effect becomes more prominent in animations, since the staircase effect tends to creep in the animation images.
The process of eliminating aliasing artifacts is broadly referred to as anti-aliasing. One common anti-aliasing mechanism is referred to as A-buffer (anti-aliased, area-averaged, accumulation buffer) in which polygon edge fragments are sampled, and the information about the fragments are stored as linked lists and blended for antialiasing. However, a disadvantage of the A-buffer algorithm is that this algorithm assumes use of an unbounded memory for storing data such as edge fragment information for complex 3D scenes (scenes with high complexity and/or with a large number of primitives). To simplify the memory requirements in the A-buffer algorithm, heuristics may be used. However, the use of heuristics degrades the quality of the output image. A further disadvantage of the A-buffer algorithm is that it does not detect “Z-edges”, thus resulting in color bleeding problems due to improper Z interpolation.
Another method of anti-aliasing involves an architecture which divides each image layer into pixel regions or “chunks”, and the geometry is presorted into bins based upon the particular chunk (or chunks) in which the geometry will be rendered. Each chuck is dealt with independently for anti-aliasing. However, the anti-alasing algorithm used in this architecture is based upon the A-buffer algorithm, and therefore, suffers from the same disadvantages and drawbacks mentioned previously.
A further anti-aliasing method is known as Z3, which maintains a sorted list of edge fragments and blends the fragments in the same manner as the A-buffer algorithm. Although the Z3 algorithm can detect “Z-edges”, it disadvantageously relies on unbounded memory, use of linked lists which require complex logic, and blending of polygon edge fragments to reduce memory usage which degrades the quality of the output image for a complex 3D scene.
Therefore, there is a need for an improved system and method for efficiently sampling 3D primitives while preventing the aliasing artifacts introduced by the sampling process.